
const http = require('http');
const fs = require('fs');

http.createServer((req, resp) => {
    if (req.url == '/favicon.ico') {
        resp.writeHead(200)
        resp.end()
        return
    }
    console.log(req.url)
    resp.writeHead(200)
    // resp.end('hello')
    fs.createReadStream(__dirname + '/index.html')
        .pipe(resp);
}).listen(3000, () => {
    console.log('running at port 3000')
})
